package com.weixin.paleituo.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.weixin.paleituo.bean.BuyHouseStepBean;
import com.weixin.paleituo.factory.SaleHouseStepFragmentFactory;

/**
 * Author yichao
 * Time  2017/11/30 9:34
 * Dest  售房进度
 */

public class SaleHouseStepPagerAdapter extends FragmentPagerAdapter {
    private BuyHouseStepBean mBuyHouseStepBean;

    public SaleHouseStepPagerAdapter(FragmentManager fm, BuyHouseStepBean buyHouseStepBean) {
        super(fm);
        mBuyHouseStepBean = buyHouseStepBean;
    }

    @Override
    public Fragment getItem(int position) {


        return SaleHouseStepFragmentFactory.getFragment(position,mBuyHouseStepBean);
    }
    @Override
    public int getCount() {
        return SaleHouseStepFragmentFactory.size();
    }
}
